LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ZuiApp

LOCAL_SRC_FILES := ../../ZUI/main/main.cpp ../../ZUI/thirdParty/SDL2/src/main/android/SDL_android_main.c

ifeq ($(PM5_CONFIG),debug)
  LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../ZUI $(LOCAL_PATH)/../../ZUI/support $(LOCAL_PATH)/../../ZUI/thirdParty $(LOCAL_PATH)/../../ZUI/thirdParty/SDL2/include $(LOCAL_PATH)/../../ZUI/thirdParty/curl/include
  LOCAL_CPP_FEATURES := exceptions
  LOCAL_STATIC_LIBRARIES := ZuiLib SDL2 TTF freetype zlib curl mbedtls lua webp png unibreak leveldb snappy
  LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
  LOCAL_CFLAGS := -D__ANDROID__ -DDEBUG -D_DEBUG -D_CRTDBG_MAP_ALLOC -DSDL_STATICLIB
  include $(BUILD_SHARED_LIBRARY)
endif

ifeq ($(PM5_CONFIG),release)
  LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../ZUI $(LOCAL_PATH)/../../ZUI/support $(LOCAL_PATH)/../../ZUI/thirdParty $(LOCAL_PATH)/../../ZUI/thirdParty/SDL2/include $(LOCAL_PATH)/../../ZUI/thirdParty/curl/include
  LOCAL_CPP_FEATURES := exceptions
  LOCAL_STATIC_LIBRARIES := ZuiLib SDL2 TTF freetype zlib curl mbedtls lua webp png unibreak leveldb snappy
  LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
  LOCAL_CFLAGS := -D__ANDROID__ -DNDEBUG -DSDL_STATICLIB
  include $(BUILD_SHARED_LIBRARY)
endif